cmake_minimum_required(VERSION 3.10)

project(
    opencv-knn
    LANGUAGES
        C
        CXX
)

# 设置语言标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-old-style-cast -fPIC")

# 设置编译结果输出路径
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
if (NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
endif()

find_package(OpenCV REQUIRED)
# find_package(Qt5 COMPONENTS DBus Network Core Widgets REQUIRED)

include(GNUInstallDirs)

add_subdirectory(train-project)
add_subdirectory(predict-project)
add_subdirectory(matchtemplate-project)

